package com.cloudcc.mobile.bull.model.impl;

import com.cloudcc.mobile.basebean.BaseListEntity;
import com.cloudcc.mobile.bull.api.GongniuCheckHistoryNewApi;
import com.cloudcc.mobile.bull.api.MarketApi;
import com.cloudcc.mobile.bull.bean.MarketBean;
import com.cloudcc.mobile.bull.model.IMarketModel;
import com.cloudcc.mobile.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * <pre>
 *     author : 92152
 *     e-mail : xxx@xx
 *     time   : 2020/07/21
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class MarketModel implements IMarketModel {
    private MarketApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public MarketApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(MarketApi.class);
        }
    }

    @Override
    public Observable<BaseListEntity<MarketBean>> inquireMarketList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireMarketList(praise);
    }
}
